﻿///-----------------------------------------------Error--------------------------------------------------------///


$(function () {
    $("#dialog_error").dialog({
        autoOpen: false,
        modal: true
    });


});
function showError(msg) {
    $("#dialog_error").prepend(msg);
    $("#dialog_error").dialog("open");
}


///-----------------------------------------------warning-------------------------------------------------------///


$(function () {
    $("#dialog_warning").dialog({
        autoOpen: false,
        buttons: {
            Ok: function () {
                $(this).dialog("close");
            }
        }
    });


});
function showWarning(msg) {
    $("#dialog_warning").append(msg);
    $("#dialog_warning").dialog("open");
}


///-----------------------------------------------success-------------------------------------------------------///


function showMsg(ex) {
    ($)(document).ready(function () {
        $("#prompt").append(ex);
        $("#prompt").slideDown();

        setTimeout(function () {
            $("#prompt").fadeOut(3000);
            window.location.href = "CourseManage.aspx";
        }, 4000)
    });
    $("#prompt").mouseover(function () {
        $("#prompt").fadeOut(2000);
        window.location.href = "CourseManage.aspx";
    })
}

